function resourceLoading() {
    let canvas = document.getElementById("_canvas");
    let ctx = canvas.getContext("2d");
    let engine = new Engine(ctx);
    let layer = new Layer(ctx);

    let dc = new Date().getTime();
    layer.preload = function (loader) {
        loader.loadImageSet([
            'assets/images/Explosion_Sequence_A 1.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 2.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 3.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 4.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 5.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 6.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 7.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 8.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 9.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 10.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 11.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 12.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 13.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 14.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 15.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 16.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 17.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 18.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 19.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 20.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 21.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 22.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 23.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 24.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 25.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 26.png?_t=' + dc,
            'assets/images/Explosion_Sequence_A 27.png?_t=' + dc,
            'assets/shot/spr_enemy_fragment1.png?_t=' + dc,
            'assets/shot/spr_enemy_fragment2.png?_t=' + dc,
            'assets/shot/spr_enemy_fragment3.png?_t=' + dc,
            'assets/shot/spr_enemy_fragment4.png?_t=' + dc,
            'assets/shot/spr_enemy_fragment5.png?_t=' + dc,
            'assets/shot/spr_enemy_fragment6.png?_t=' + dc,
            'tank/img/battlecity.png?_t=' + dc,
            'tank/img/battlecity2.bmp?_t=' + dc,
            'tank/img/battlecity2.png?_t=' + dc,
            'tank/img/bonus.bmp?_t=' + dc,
            'tank/img/bonus.png?_t=' + dc,
            'tank/img/bore.bmp?_t=' + dc,
            'tank/img/bore.png?_t=' + dc,
            'tank/img/bullet.bmp?_t=' + dc,
            'tank/img/bullet.png?_t=' + dc,
            'tank/img/button-a.png?_t=' + dc,
            'tank/img/button-arrow.png?_t=' + dc,
            'tank/img/enemy.bmp?_t=' + dc,
            'tank/img/enemy.png?_t=' + dc,
            'tank/img/explode1.bmp?_t=' + dc,
            'tank/img/explode1.png?_t=' + dc,
            'tank/img/explode2.bmp?_t=' + dc,
            'tank/img/explode2.png?_t=' + dc,
            'tank/img/explode2_.png?_t=' + dc,
            'tank/img/flag.bmp?_t=' + dc,
            'tank/img/flag.png?_t=' + dc,
            'tank/img/gameover.bmp?_t=' + dc,
            'tank/img/gameover.png?_t=' + dc,
            'tank/img/gameover2.png?_t=' + dc,
            'tank/img/loading.png?_t=' + dc,
            'tank/img/misc.bmp?_t=' + dc,
            'tank/img/misc.png?_t=' + dc,
            'tank/img/num.bmp?_t=' + dc,
            'tank/img/num.png?_t=' + dc,
            'tank/img/player1.bmp?_t=' + dc,
            'tank/img/player1.png?_t=' + dc,
            'tank/img/player2.bmp?_t=' + dc,
            'tank/img/shield.bmp?_t=' + dc,
            'tank/img/shield.png?_t=' + dc,
            'tank/img/tile.bmp?_t=' + dc,
            'tank/img/tile.png?_t=' + dc,
            'assets/shot/bg_bottom_left.png?_t=' + dc,
            'assets/shot/bg_bottom_mid.png?_t=' + dc,
            'assets/shot/bg_bottom_right.png?_t=' + dc,
            'assets/shot/bg_mid_left.png?_t=' + dc,
            'assets/shot/bg_mid_right.png?_t=' + dc,
            'assets/shot/bg_tile.png?_t=' + dc,
            'assets/shot/bg_tileset.png?_t=' + dc,
            'assets/shot/bg_tile_dark.png?_t=' + dc,
            'assets/shot/bg_top_left.png?_t=' + dc,
            'assets/shot/bg_top_mid.png?_t=' + dc,
            'assets/shot/bg_top_right.png?_t=' + dc,
            'assets/shot/enemy.png?_t=' + dc,
            'assets/shot/enemy_flash.png?_t=' + dc,
            'assets/shot/spr_bullet.png?_t=' + dc,
            'assets/shot/spr_bullet2.png?_t=' + dc,
            'assets/shot/spr_bullet_gaitubao_63x31.png?_t=' + dc,
            'assets/shot/spr_bullet_gaitubao_64x28.png?_t=' + dc,
            'assets/shot/spr_enemy_fragment1.png?_t=' + dc,
            'assets/shot/spr_enemy_fragment2.png?_t=' + dc,
            'assets/shot/spr_enemy_fragment3.png?_t=' + dc,
            'assets/shot/spr_enemy_fragment4.png?_t=' + dc,
            'assets/shot/spr_enemy_fragment5.png?_t=' + dc,
            'assets/shot/spr_enemy_fragment6.png?_t=' + dc,
            'assets/shot/spr_enemy_splatter1.png?_t=' + dc,
            'assets/shot/spr_enemy_splatter2.png?_t=' + dc,
            'assets/shot/spr_enemy_splatter3.png?_t=' + dc,
            'assets/shot/spr_player.png?_t=' + dc,
            'assets/shot/spr_player_gaitubao_103x101.png?_t=' + dc,
            'assets/shot/spr_weapon.png?_t=' + dc,
            'assets/shot/tiles2.png?_t=' + dc,
            'assets/shot/titlescreen.png11?_t=' + dc,
        ]);
        loader.loadAudioSet([
            'tank/sound/sound-boom1.mp311?_t=' + dc,
            'tank/sound/sound-boom1.ogg?_t=' + dc,
            'tank/sound/sound-boom1.wav?_t=' + dc,
            'tank/sound/sound-boom2.mp3?_t=' + dc,
            'tank/sound/sound-boom2.ogg?_t=' + dc,
            'tank/sound/sound-boom2.wav?_t=' + dc,
            'tank/sound/sound-fire.mp3?_t=' + dc,
            'tank/sound/sound-fire.ogg?_t=' + dc,
            'tank/sound/sound-fire.wav?_t=' + dc,
            'tank/sound/sound-fire2.mp3?_t=' + dc,
            'tank/sound/sound-fire2.ogg?_t=' + dc,
            'tank/sound/sound-fire2.wav?_t=' + dc,
            'tank/sound/sound-hit.mp3?_t=' + dc,
            'tank/sound/sound-hit.ogg?_t=' + dc,
            'tank/sound/sound-hit.wav?_t=' + dc,
            'tank/sound/sound-hit2.mp3?_t=' + dc,
            'tank/sound/sound-hit2.ogg?_t=' + dc,
            'tank/sound/sound-hit2.wav?_t=' + dc,
            'tank/sound/sound-life.mp3?_t=' + dc,
            'tank/sound/sound-life.ogg?_t=' + dc,
            'tank/sound/sound-life.wav?_t=' + dc,
            'tank/sound/sound-over.mp3?_t=' + dc,
            'tank/sound/sound-start.mp3?_t=' + dc,
            'tank/sound/sound-start.ogg?_t=' + dc,
            'tank/sound/sound-start.wav?_t=' + dc,
            'tank/sound/sound-win.mp3?_t=' + dc,
            'tank/sound/sound-win.ogg?_t=' + dc,
            'tank/sound/sound-win.wav'
        ])
    }
    layer.create = function () {
        let textObj = new TextObject('green?_t=' + dc, '50px Verdana');
        textObj.x = canvas.width / 2 - 200;
        textObj.y = canvas.height / 2;
        textObj.text = '恭喜，加载完成！';
        layer.addObject(textObj);
    }

    engine.addLayer(layer);
    engine.run();

    return engine;
}